package com.rpay.dao.level;

import com.rpay.dao.mapper.RpayLevelMapper;
import com.rpay.model.level.RpayLevel;
import org.apache.ibatis.session.RowBounds;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import java.util.List;

/**

 */
@Repository
public class LevelDao {
    @Autowired
    @Qualifier("readSqlSession")
    private SqlSessionTemplate readSqlSession;

    @Autowired
    @Qualifier("writeSqlSession")
    private SqlSessionTemplate writeSqlSession;

    @Autowired
    private RpayLevelMapper rpayLevelMapper;

    public List<RpayLevel> selectDataList(RpayLevel rpayLevel, RowBounds rowBounds) {
//        LevelDOMapper levelDOMapper = readSqlSession.getMapper(LevelDOMapper.class);
        rpayLevel.setId(1);
        List result = rpayLevelMapper.selectAll();
        return result;
//        levelDOMapper.select(levelDO);
//        levelDOMapper.selectByPrimaryKey(1);
//        return levelDOMapper.select(levelDO);
//        return levelDOMapper.selectDataList(levelDO);
//        return levelDOMapper.(levelDO,rowBounds);
//        return readSqlSession.selectList("rpay.news.selectDataList", levelDO, rowBounds);
    }


}
